<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户登录</title>
		<link rel='stylesheet' type='text/css' href='/static/view/css/common.css'/>
		<link rel='stylesheet' type='text/css' href='/static/view/css/head.css'/>
	</head>
	<body>
		
	<div id='head'>
		<div id='head-navi'><a href='http://localhost:8080/index.php' onclick="setHomepage('http://localhost:8080/index.php')">设为首页</a>&nbsp;<b>|</b>&nbsp;<a href='http://localhost:8080/index.php' onclick="alert('请按Ctrl+D添加到收藏夹')">收藏本站</a></div>
		<div id='head-navi-bottom'>
                    <div class='logo'><a href='/User/forum/forum.html' onfocus="this.blur()"><img src='/static/view/image/banner/logo.png'/></a></div>
                    <div class='status'>
                        <?php if(empty($_SESSION['userInfo'])){ echo "<a href='/User/user/login'>登录</a> | "; echo "<a href='/User/user/register'>注册</a>"; }else if($_SESSION['userInfo']['role']=='普通用户'){ echo '欢迎会员<a href='.'/User/user/userInfo?id='.$_SESSION['userInfo']['id'].'>'.$_SESSION['userInfo']['username'].'</a>登录'.'<br/>'.'积分：'.$_SESSION['userInfo']['credits'].'&nbsp;|&nbsp;'.'用户组:'.$_SESSION['userInfo']['role']; echo "      <a href='/User/user/logout/'><input type='button' value='安全退出'></a>"; }else if($_SESSION['userInfo']['role']=='管理员'){ echo '欢迎管理员<a href='.'/User/user/userInfo?id='.$_SESSION['userInfo']['id'].'>'.$_SESSION['userInfo']['username'].'</a>登录'.'<br/>'.'积分：'.$_SESSION['userInfo']['credits'].'&nbsp;|&nbsp;'.'用户组:'.$_SESSION['userInfo']['role']; echo '&nbsp;|&nbsp;<a href="/Admin/user/userList">进入管理中心</a>'; echo "&nbsp;|&nbsp;<a href='/User/user/logout/'><font><b>安全退出</b></font></a>"; } ?>
                    </div>	
            </div>
	</div>
	
	<div id='navi'>
            <ul>
                <li><a href='/User/forum/forum.html'>论坛</a></li>
                <!--<li><a href='/User/user/login.html'>登录</a></li>-->
                <li><a href='/User/user/register.html'>注册</a></li>
                <li><a href='/User/user/findPassword.html'>找回密码</a></li>
                <!--<li><a href='/User/posts/postsList.html'>帖子列表</a></li>-->
                <!--<li><a href='/User/user/searchForum.html'>搜索</a></li>-->
                <!--<li><a href='/User/user/notice.html'>通知</a></li>-->
                <!--<li><a href='/User/forum/aboutUs.html'>关于我们</a></li>-->
                <!--<li><a href="/User/user/logout">安全退出</a></li>-->
            </ul>
	</div>
	<div id='search'>
            <form action='/User/posts/postsSearch' method='post'>
                <label for='search-content'><span style="font-weight:700;">搜索帖子</span></label>
               
                <input id='search-content' class='content' name='theme' type='text' results="n" placeholder='帖子主题' required autocomplete="on" x-webkit-speech speech/>

                <button type='submit'>搜索</button><font style="color:blue;font-weight: 700">　<?php echo '今天是'.date('Y-m-d',time()).'　'.date('D',time()); ?>　<span id="clock"></span></font>
            </form>
	</div>
        <script type='text/javascript' src='/static/view/js/clock.js'></script>
        <script type='text/javascript'>
           startTime();
	$(document).ready(function(){
		/*$('#head-submit').live('click',function(){
                    if($.trim($('#head-username').val())==''||$.trim($('#head-password').val())==''){
                            window.location.href='./login.html';
                    }else{
                        var data=$('#head-form').serialize();
                        $.ajax({
                            url:'./',
                            data:data,
                            dataType:'html',
                            type:'post',
                            success:function(){
                                    $('#head-form').hide();
                                    $('.status').html("<h3>欢迎会员XX登录</h3>");
                            },
                            error:function(){
                                    window.alert('an error accured');
                            }	
                        });
                    }			
		});
		
		$('#head-username').keydown(function(e){
                    if(e.keyCode == 13){
                        e.preventDefault();
                        if($.trim($(this).val()) != ''){
                                $('#head-password').focus();
                        }else{
                                $(this).attr('placeholder','请输入用户名');
                        }
                    }	
		});
		
		$('#head-password').keydown(function(e){
			if(e.keyCode==13){
                            e.preventDefault();
                            if($.trim($(this).val())!=''){
                                    $('#head-submit').trigger('click');
                        }else{
                                $(this).attr('placeholder','请输入密码');
                                //window.location.href='./login.html';
                            }
			}
		});
		
	});*/
	</script>
	

                
		<div class='body'>
			<span class='title'>用户登录</span>
			<div class='body-infor'>
			<fieldset>
			<legend>登录信息</legend>
				<form action='__APP__/User/user/login' method='post' id="login_form"> 
					<table border='0px' cellspacing='10px'>
						<tr>
							<th><label for='username'>用户名</label></th>
							<td><input class="input" name="username" id='username' type='text' placeholder='用户名' autocomplete='on' autofocus required /></td>
							<td><a href='./register.html'><span style="font-size:13px;font-weight:bold">立即注册</span></a></td>
						</tr>
						<tr>
							<th><label for='password'>密　码</label></th>
							<td><input class="input" name="password" id='password' type='password' placeholder='密码' required></td>
							<td><a href='findPassword.html'><span style="font-size:13px;font-weight:bold">找回密码</span></a></td>
						</tr>
						<tr>
							<th><label for='checkcode'>验证码</label></th>
							<td><input class="input" name="verify" id='checkcode' type='text' placeholder='验证码区分大小写' required/></td>
							<td><img id="verifyImg" style="cursor: pointer" src='/User/public/verify/' onclick="fleshVerify()"/></td>
						</tr>
						<tr>
							<td></td>
							<td><button type='submit' id='login'>登录</button>&nbsp;<button type='reset'>清空</button></td>
                                                        <td><font size="2" color="red"><?php echo ($msg); echo ($error); ?></font></td>
						</tr>
						
					</table>
				
				
				</form>
			</fieldset>
			</div>
	
		</div>
	
	<div style="margin:20px 15px;color:#6D6D6D;">
        <div style="border-bottom: 1px solid #BDD7E3"></div>
        <div style="padding:10px 0px;line-height: 1.8;">
                <p>Copyright &copy;2012-2013 shaobo,test</p>
                <p>Welcome to our Bulletin Board System.It is our <strong>beta</strong> version,contact <a href="mailto:shaaoboo@sina.com"><font color='blue'>shaaoboo@sina.com</font></a> to give us your valuable suggestion.</p>
        </div>
</div>

        
	<script type='text/javascript' src='/static/view/js/jquery-1.8.3.js'></script>
	<script type='text/javascript'>
                function fleshVerify(){ 
                      //重载验证码
                      var time = new Date().getTime();//alert(time);
                      document.getElementById('verifyImg').src= '/User/public/verify/'+time;
                 }
		$(document).ready(function(){
                        $('#verifyImg').click(function(){
                            var time = new Date().getTime();
                            $(this).src='/User/public/verify/'+time;
                        });
                        $('.title').click(function(){
                           $('div.body-infor').slideToggle('slow');
                       });

                        $('legend').click(function(){
                          $(this).next('form').slideToggle('fast');
                      });
                        
                      
		});
	
	</script>
	</body>
</html>